import request from './request'
import { baseUrl } from '../config/config'

// 保存休息时间
export const saveRest = (params) => {
  return new Promise((resolve, reject) => {
    let successCallBack = function (res) {
      if (res.data) {
        resolve(res.data)
      }
    }
    request(successCallBack, null, baseUrl + '/rest/config/save', 'POST', params)
  })
}
//查询休息时间
export const getRestList = (params) => {
  return new Promise((resolve, reject) => {
    let successCallBack = function (res) {
      if (res.data) {
        resolve(res.data)
      }
    }
    request(successCallBack, null, baseUrl + '/rest/config/list', 'GET', params)
  })
} 